Currently, a line card (LC) needs to be disposed in each of two network devices communicating with each other using a fiber. To-be-transmitted data is converted from an electrical signal into an optical signal of a particular transmission rate, and the optical signal is transmitted using an Ethernet optical interface supporting a particular transmission rate. For optical signals of different transmission rates, according to a transmission rate of an optical signal, an LC matching the transmission rate of the optical signal needs to be installed into network devices performing communication using a fiber. Consequently, development and maintenance costs are relatively high.